Python: Update __init__.py for selectionstrategy#11419
Python: Update __init__.py for selectionstrategy#11419arnab621 wants to merge 1 commit intomicrosoft:mainfrom
Conversation
Added SelectionStrategy
Python Unit Test Overview
|
There was a problem hiding this comment.
Thank you for your contribution. Please make sure you install and run the pre-commit checks as part of developing locally. See here for more info.
Just as a quick note on Python conventions: while adding something to __init__.py provides a convenient, shorter import path, the absence of an import in __init__.py doesn't necessarily imply that something is not part of the public API. Python doesn't have strict enforcement of public/private APIs as seen in some other languages; rather, public versus private is typically indicated by naming conventions and documented usage patterns.
Nevertheless, your update makes the import more convenient and consistent with the rest of the package, so this is a helpful improvement -- thank you.
|
Haven't heard from you in a bit so superseding with #11636. |
Added SelectionStrategy
Motivation and Context
The SelectionStrategy class was defined in the semantic_kernel.agents.strategies.selection module but was not included in the package's init.py file. This omission means it was not exposed as part of the public API when importing from semantic_kernel.agents.strategies. Including this allows the use of SelectionStrategy within AgentGroupChat etc.
Description
This PR adds SelectionStrategy to the init.py file under semantic_kernel.agents.strategies, both as an import and in the all list. This change ensures the strategy is properly exported as part of the public interface of the module.
Contribution Checklist